package ${package_name}.service.impl;
import com.evada.inno.core.service.impl.BaseServiceImpl;
import ${package_name}.model.${table_name};
import ${package_name}.service.I${table_name}Service;
import ${package_name}.mapper.I${table_name}Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.apache.commons.beanutils.BeanUtils;
import java.util.*;

/**
 *
 * ${table_annotation} service impl
 *
 * @author ${author}
 * @date ${date}
 */
@Service
public class ${table_name}ServiceImpl implements I${table_name}Service {

    @Autowired
    private ${table_name}Mapper ${table_name?uncap_first}Mapper;

    @Override
    public int deleteByPrimaryKey(String id) {
        return ${table_name?uncap_first}Mapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(${table_name} record) {
        return ${table_name?uncap_first}Mapper.insert(record);
    }

    @Override
    public int insertSelective(${table_name} record) {
        return ${table_name?uncap_first}Mapper.insertSelective(record);
    }

    @Override
    public ${table_name} selectByPrimaryKey(String id) {
        return ${table_name?uncap_first}Mapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(${table_name} record) {
        return ${table_name?uncap_first}Mapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(${table_name} record) {
        return ${table_name?uncap_first}Mapper.updateByPrimaryKey(record);
    }

    @Override
    public List<${table_name}VO> findPage(${table_name}Query query) {
        PageHelper.startPage(query.getPageNum(), query.getPageSize());
        List<${table_name}> list = ${table_name?uncap_first}Mapper.findByQuery(query);
        return new PageInfo(resultList);
    }

    @Override
    public List<${table_name}> findByQuery(${table_name}Query query){
        return ${table_name?uncap_first}Mapper.findByQuery(query);
    }